﻿using System.Collections;

namespace Collections;

public class HashTableItem
{
    public void MyHashTable()
    {
        Hashtable employees = new Hashtable()
        {
            { 101, "Smith" },
            { 102, "Jerry" },
            { 103, "Jack" },
            { 104, "Anna" },
        };

        employees.Add(105, "Je");

        employees.Remove(105);

        foreach (var item in employees)
        {
            Console.WriteLine(item);
        }

        if (employees[101] is string)
        {
            string value = Convert.ToString(employees[101]);
            Console.WriteLine(value);
        }


        bool k = employees.ContainsKey(101);
        bool v = employees.ContainsValue("Anna");
    }
}